<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #canvas {
        border: 1px solid;
      }
    </style>
  </head>

  <body>
    <img id="source" src="./image.jpg" width="300" height="227" />
    <canvas width="400" height="400" id="canvas"> 请升级你的服务器 </canvas>
    <script>
      var canvas = document.querySelector("#canvas");
      var context = canvas.getContext("2d");
      context.beginPath();
      context.moveTo(0, 200);
      // context.quadraticCurveTo(200,100,400,200); // 二次贝塞尔
      // context.bezierCurveTo(100, 350, 300, 50, 400, 200); // 三次贝塞尔
      context.arcTo(150,20,150,70,50); // 创建弧
      context.lineTo(400, 400);
      context.lineTo(0, 400);
      context.stroke();
   
      // }
    </script>
  </body>
</html>
